<!--
 * @Author: hifishroom
 * @Date: 2021-08-18 15:55:03
 * @LastEditTime: 2021-08-22 18:47:25
 * @FilePath: \index\src\components\common\swiper\Slides2.vue
-->
<template>
  <div class="slides2">
    <swiper class="swiper-container" :options="swiperOption">
      <slot></slot>
      <swiper-slide v-for="(items, index) in imgs" :key="index">
        <div>
          <div>
            <img :src="items.img" alt="" :class="imgClass" />
          </div>
          <div :class="textClass">{{ items.name }}</div>
        </div>
      </swiper-slide>
    </swiper>
  </div>
</template>

<script>
export default {
  name: "Slides2",
  props: {
    swiperOption: {
      type: Object,
      default() {
        return {};
      }
    },
    imgs: {
      type: Array,
      default() {
        return [];
      }
    },
    imgClass: {
      type: String,
      default() {
        return "";
      }
    },
    textClass: {
      type: String,
      default() {
        return "";
      }
    }
  },
  data() {
    return {};
  }
};
</script>

<style lang="scss">
.slides2 {
  width: 100%;
  height: 100%;
}

.page-img {
  width: 35px;
  height: 35px;
}

.my-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  position: relative;
  transition-property: transform;
}
</style>
